<!--
 * @Descripttion: 
 * @version: 
 * @Author: hejin.gao
 * @Date: 2022-10-10 15:55:34
 * @LastEditors: hejin.gao
 * @LastEditTime: 2022-10-10 16:43:53
-->
<template>
    <div class="weather">
        <div id="he-plugin-standard"></div>
    </div>
</template>

<script>
import { loadScript } from '../utils/tools'
export default {
    mounted() {

        this.$nextTick(() => {

            window.WIDGET = {
                "CONFIG": {
                    "layout": "1",
                    "width": "450",
                    "height": "150",
                    "background": "5",
                    "dataColor": "FFFFFF",
                    "key": "e2280de8c1a24c6fa781932f3e50250f"
                }
            };

            // 动态加载js
            loadScript('https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0', function () {
                console.log('加载完成');
            })
        })

    },
}
</script>

<style lang="scss">
@import "@/assets/styles/index.scss";

.weather {
    position: absolute;
    // background: #2a2b2ee7;

    @include background_color("panel-background-color");
    top: 90px;
    left: 20px;
    width: 450px;
    z-index: 8;
    border-radius: 3px;

    .wv-lt-refresh {
        display: none;
    }
    .wv-lt-location a{
        display: none;
    }
    .wv-n-h-now-rain {
        display: none; 
    }
}

</style>